package com.bitcola.exchange.security.community.config;

import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class ElasticSearchConfig {
    /*
    防止netty的bug
    java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]
    */
    @PostConstruct
    void init() {
        System.setProperty("es.set.netty.runtime.available.processors","false");
    }
}
